//
//  DetailsView.m
//  08-HomeWork
//
//  Created by GivenBmli on 16/7/25.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "DetailsView.h"
#import "PrefixHeader.pch"
#import "DetailClass.h"
#import "FirstViewControlle.h"
@interface DetailsView ()

@end

@implementation DetailsView

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"详情界面";
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.backgroundColor = [UIColor orangeColor];
    DetailClass *class = [[DetailClass alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight)];
    class.backgroundColor = [UIColor redColor];
    class.modelClass = _model;
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(barButtonClick:)];
    [self.view addSubview:class];
}

- (void)barButtonClick:(UIBarButtonItem *)item {
    FirstViewControlle *VC = [[FirstViewControlle alloc] init];
    [self.navigationController pushViewController:VC animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
